Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@d3fc/d3fc-financial-feed

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@d3fc/d3fc-financial-feed

An API for fetching financial time-series data from different sources including GDAX

  • 6.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

d3fc-financial-feed

An API for fetching financial time-series data from different sources including GDAX.

Main D3FC package

Installing

npm install @d3fc/d3fc-financial-feed

API Reference

  • GDAX

GDAX

import { feedGdax } from 'd3fc-financial-feed';

const gdax = feedGdax()
  .product('BTC-GBP');

gdax()
  .then(data => { console.log(data); });

// [
//   {
//     date: 2016-05-11T08:51:00.000Z,
//     open: 317.99,
//     high: 317.99,
//     low: 317.99,
//     close: 317.99,
//     volume: 0.24
//   },
//   ...
// ]

https://docs.gdax.com/#get-historic-rates

# fc.feedGdax()

Constructs a new GDAX feed.

# feedGdax()

Makes a request to the GDAX API, returns a Promise which resolves with data. Data returned from the API is mapped to an array of objects with numeric open, high, low, close and volume properties, and a Date instance date property.

# feedGdax.product([value])

If value is specified, sets the product id to the specified string and returns this feed instance. If value is not specified, returns the current product id, which defaults to "BTC-USD".

# feedGdax.start([value])

If value is specified, sets the start date to the specified Date object and returns this feed instance. If value is not specified, returns the current start date, which defaults to null.

# feedGdax.end([value])

If value is specified, sets the end date to the specified Date object and returns this feed instance. If value is not specified, returns the current end date, which defaults to null.

# feedGdax.granularity([value])

If value is specified, sets the granularity to the specified number of seconds and returns this feed instance. If value is not specified, returns the current granularity, which defaults to null.

Keywords

FAQs

Package last updated on 19 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc